﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Threading;

namespace parentalcontrols
{
    class Program
    {
        static void Main(string[] args)
        {

            while (true)
            {
                DateTime curenttime = DateTime.Now;
                if (curenttime.Hour < 20 && curenttime.Hour >= 8)
                {

                }
                else if (curenttime.Hour >= 20)
                {
                    if (curenttime.Minute >= 1)
                    {
                        shutdown();
                    }
                }
                Thread.Sleep(1000);
            }
        }

        static void shutdown()
        {
            Process.Start("shutdown", "/f /s /t 0");
            Thread.Sleep(1000);
        
        }
    }
}
